﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using DAL;

/// <summary>
///Web_videoDAL 的摘要说明
/// </summary>
public class Web_videoDAL
{

    /// <summary>
    /// 根据查询参数得到视频集合
    /// </summary>
    /// <param name="q">查询参数</param>
    /// <returns>视频集合</returns>
    public DataTable GetVieoByParam(VideoQuery q)
    {

        try
        {
            Tools tool = new Tools();
            tool.AddSqlParameter("@sign", SqlDbType.Int, q.Sign);
            tool.AddSqlParameter("@v_id", SqlDbType.Int, q.V_id);
            tool.AddSqlParameter("@classid", SqlDbType.Int, q.Classid);
            tool.AddSqlParameter("@topnum", SqlDbType.Int, q.Topnum);
            return SqlHelper.ExecuteGetTable(DBManager.emweb_new, CommandType.StoredProcedure, "web_video_select_w", tool.GetSqlParameters());
        }
        catch (Exception ex)
        {
            return null;
        }
    }
}